//导航栏显示购物车数量混入
import { mapGetters } from 'vuex'
export default {
    computed:{
      ...mapGetters('m_cart',['total'])
    }, 
    methods:{
      setBadge(){
        uni.setTabBarBadge({
          index: 2,
          text: this.total + ''
        })
      }
    },
    watch:{
      total(){
        this.setBadge()
      }
    },
    onShow(){
      this.setBadge()
    }
	}